package com.jinunn.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.jinunn.system.entity.Dept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jinunn.system.plugin.mybatis.annotation.DataPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 部门表 Mapper 接口
 * </p>
 *
 * @author JIN
 * @since 2024-07-12
 */
@Mapper
public interface DeptMapper extends BaseMapper<Dept> {

    /**
     * 重写查询list, 用于管理数据权限
     *
     * @param queryWrapper 查询参数
     * @return list
     */
    @DataPermission(deptIdColumnName = "id")
    @Override
    List<Dept> selectList(@Param(Constants.WRAPPER) Wrapper<Dept> queryWrapper);

}
